convert comma separated number to number in php

161

convert comma separated number to number in php -

$number = '1,000.5669';
$number = (float) str_replace(',', '', $number);
var_dump($number);

Comments

Submit
0 Comments